﻿using Coldairarrow.Entity.Base_Manage;
using Coldairarrow.Entity.DTO;
using Coldairarrow.Entity.PB;
using Coldairarrow.Util;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.PB
{
    public partial interface IPB_DeliveryPlanBusiness
    {
        Task<PageResult<PB_DeliveryPlan>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<PB_DeliveryPlan> GetTheDataAsync(string id);
        Task AddDataAsync(PB_DeliveryPlan data);
        Task UpdateDataAsync(PB_DeliveryPlan data);
        Task DeleteDataAsync(List<string> ids);

        /// <summary>
        /// 保存维修工单及明细数据
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task AddDataList(SavaDataDeliveryPlan data);
        Task UpdateDataList(SavaDataDeliveryPlan data);

        Task<DeliveryPlanListInfo> GetDeliveryPlanListInfo(string ParentId);


        /// <summary>
        /// 审核维修申请单
        /// </summary>
        /// <param name="ApplyId"></param>
        /// <returns></returns>
        Task ToExamineOk(string Id);
        /// <summary>
        /// 获取发货计划列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<PB_DeliveryPlanList>> GetDataListInfo(PageInput<PB_ScheduleDetailConditionDTO> input);
        /// <summary>
        /// 获取当前操作人法人下的工厂
        /// </summary>
        /// <returns></returns>
        Task<List<Base_Department>> GetDetpListAsync();
        /// <summary>
        ///大屏显示发货进度
        /// </summary>
        /// <param name="toTodayDays">到今天的天数。-1表示昨天</param>
        /// <returns>{"label": "发货进度","value": 43.2,"data": 100}</returns>
        PB_DeliveryPlanProgressDTO GetTodayProgressAsync(int toTodayDays);
        // <summary>
        /// 大屏显示当日待发货项目数量
        /// </summary>
        /// <param name="toTodayDays">到今天的天数。-1表示昨天</param>
        /// <returns>{"value": "100"}</returns>
        PB_DeliveryPlanValueDTO GetTodayReadyDeliveryProject(int toTodayDays);
        /// <summary>
        /// 大屏显示当日已备货数量
        /// </summary>
        /// <param name="toTodayDays">到今天的天数。-1表示昨天</param>
        /// <returns></returns>
        PB_DeliveryPlanValue3DTO GetTodayPickUpAmount(int toTodayDays);
        /// <summary>
        /// 大屏显示当日未备货数量
        /// </summary>
        /// <param name="toTodayDays">到今天的天数。-1表示昨天</param>
        /// <returns></returns>
        PB_DeliveryPlanValue3DTO GetTodayNoPickUpAmount(int toTodayDays);
        /// <summary>
        /// 大屏显示当日已发货数量
        /// </summary>
        /// <param name="toTodayDays">到今天的天数。-1表示昨天</param>
        /// <returns></returns>
        PB_DeliveryPlanValue3DTO GetTodayDeliveryAmount(int toTodayDays);
        /// <summary>
        /// 大屏显示累计发货重量
        /// </summary>
        /// <returns>{value": 43.12}</returns>
        PB_DeliveryPlanProgressDTO GetTodayTotalWeightAsync(int toTodayDays);
        /// <summary>
        /// 大屏显示计划列表
        /// </summary>
        /// <returns></returns>
        Task<List<PB_DeliveryPlanDetails2DTO>> GetDeliveryPlanList();
        Task<List<PB_DeliveryPlanDetails2DTO>> GetDeliveryPlanList2();
        /// <summary>
        /// 大屏显示发货超时
        /// </summary>
        /// <param name="toTodayDays">到今天的天数。-1表示昨天</param>
        /// <returns>超时项目列表</returns>
        Task<List<PB_DeliveryPlanDelayNameValueDTO>> GetDeliveryPlanDelayList(int toTodayDays);
        /// <summary>
        /// 大屏显示发货城市
        /// </summary>
        /// <param name="toTodayDays">到今天的天数。1表示昨天</param>
        /// <returns>['新乡市',[[{name: '新乡市'}, {name: '新乡市', value: 200, shippingInfo: 发货总数:2000件 }], [{name: '新乡市'}, {name: '呼和浩特市', value: 100, shippingInfo: 发货数:1000件 }], [{name: '新乡市'}, {name: '成都市', value: 100, shippingInfo: 发货数:1000件 }]]]</returns>
        Task<List<List<object>>> GetDeliveryPlanCity(int toTodayDays);
    }
}